package dao;
import java.sql.Connection;
import java.sql.DriverManager;


public class PrincipalDAO {

	public static Connection connect(){

		Connection conn = null;

		try
		{
			String dirActual = System.getProperty("user.dir");
			dirActual += "/songLauncherDB/songLauncherDB"; 
		    Class.forName("org.sqlite.JDBC");
		    conn = DriverManager.getConnection("jdbc:sqlite:" + dirActual);
		    return conn;
		}
		catch (Exception e)
		{
			System.err.println ("No se pudo conectar a la base de datos. Tablas: " + e.getMessage());
		}
		
		return conn;
	}
	
}
